<?php $controller = $this->uri->segment(1);
$function = $this->uri->segment(2);
?>
<div class="space"><a name="top"></a></div>
<div id="column_left_news">
	<div class="content"> 
		<!--effect hover-->
		<style type="text/css">
			/* *, body{
				padding:0;
				margin:0;
			} */
			a img{
				border:none;
			}
			/*Start here*/
			#div1 a{
				display:block;
				position:relative;
				height:120px;
				width:120px;
			}
			#div1 a span{
				position:absolute;
				height:120px;
				width:120px;
				top:0;
				left:0;
			}
			/*
			 * CSS only technique
			 * 
			#div1 a img{
				display:inline;
			}
			#div1 a span img{
				display:none;
			}
			#div1 a:hover img{
				display:none;
			}
			#div1 a:hover span img{
				display:inline;
			}
			*/
		</style>
		<script type="text/javascript">
			$(document).ready(function(){
				$('#div1 a').hover(function(){
					$('span img',$(this)).fadeOut();
					$('>img',$(this)).fadeIn();//Khong co cung ko sao
				},function(){
					$('span img',$(this)).fadeIn();
					$('>img',$(this)).fadeOut();//Neu bo phia tren thi bo luon o day
				})
			});
		</script>
		<!--end effect hover-->
		<div class="news">
			<?php 
			if(!empty($result)):
			?>
			<div class="breadcrumb">
				<a href="<?=base_url()?>">Trang chủ</a> » 
				<?php if($controller == 'cuoc-thi'){ ?><a href="<?=base_url().'cuoc-thi'?>">CUỘC THI</a><?php }
				else if($controller == 'live-concert'){ ?><a href="<?=base_url().'live-concert'?>">LIVE CONCERT</a><?php }
				else {?><a href="<?=base_url().'tin-tuc'?>">TIN TỨC</a><?php } ?>
			</div>
			<div class="line_bottom clearfix"></div>
			<?php 
			foreach($result as $value):
			?>
			<div class="images120">
				<div id="div1">
					<?php if($controller == 'cuoc-thi' || $controller =='live-concert'){ ?>
						<a href="<?=base_url().$value['menu_slug'].'/view/'.$value['slug']?>">
				<?php }else{?>
						<a href="<?=base_url().'tin-tuc/'.$value['menu_slug'].'/view/'.$value['slug']?>">
				<?php } ?>
						<img style="display: none;" src="<?=base_url().IMAGE_THUMB_DIR.$value['thumb']?>" height="120" width="120">
						<span class="hoverblack">
							<img style="display: inline;" src="<?=base_url().IMAGE_THUMB_DIR.$value['thumb']?>" height="120" width="120">
						</span>
					</a>
				</div>
				<span class="author">Cập nhật bởi: <?=$value['author']?></span>
			</div>
			<h3>
				<?php if($controller == 'cuoc-thi' || $controller =='live-concert'){ ?>
				<a href="<?=base_url().$value['menu_slug'].'/view/'.$value['slug']?>"><?=$value['name']?></a>
				<?php }else{?>
				<a href="<?=base_url().'tin-tuc/'.$value['menu_slug'].'/view/'.$value['slug']?>"><?=$value['name']?></a>
				<?php } ?>
				<br>
				<small class="date">
					<img src="<?=base_url().'static/images/'?>bg-meta-categories.gif" align="absmiddle"> 
						<a href="<?=base_url().$controller?>">
							<strong><?=$value['menu_name']?></strong>
						</a> 
						<img src="<?=base_url().'static/images/'?>bg-meta-date.gif" align="absmiddle" />&nbsp;<?=date('Y-m-d',strtotime($value['created_time']))?>&nbsp;<img src="<?=base_url().'static/images/'?>folder_star.png" align="absmiddle"/>&nbsp;<strong><?=$value['view_count']?></strong>&nbsp;lượt xem&nbsp;<img src="<?=base_url().'static/images/'?>bg-meta-comments.gif" align="absmiddle"/></small>
			</h3>
			<p><span><?=parserEditorHTML($value['intro'])?></span></p>
			<div class="readmore">
			<?php if($controller == 'cuoc-thi' || $controller =='live-concert')
			{
			?>
				<a href="<?=base_url().$controller.'/view/'.$value['slug']?>">xem chi tiết</a></div>
			<?php }else{?>
				<a href="<?=base_url().$controller.'/'.$value['menu_slug'].'/view/'.$value['slug']?>">xem chi tiết</a></div>
			<?php }?>
			<div class="line_dot_bottom clearfix"></div>
			<?php 	
				endforeach;
			endif;
			?>
			<?=$this->pagination->create_links()?>
		</div>
	</div>
</div>